/****************************************************************************
 * libwiigui Template
 * Tantric 2009
 *
 * video.h
 * Video routines
 ***************************************************************************/

#ifndef _VIDEO_H_
#define _VIDEO_H_

#include <ogcsys.h>

void InitVideo();
void StopGX();
void ResetVideo_Menu();
void Menu_Render();
u8 * Video_GetFrame(int * width, int * height);
void Menu_DrawImg(u8 data[], u16 width, u16 height, u8 format, f32 xpos, f32 ypos, f32 zpos, f32 degrees, f32 scaleX, f32 scaleY, u8 alpha);
void Menu_DrawImgCut(u8 data[], u16 width, u16 height, u8 format, f32 xpos, f32 ypos, f32 zpos, f32 degrees, f32 scaleX, f32 scaleY, u8 alpha, f32 minwidth, f32 maxwidth, f32 minheight, f32 maxheight);
void Menu_DrawRectangle(f32 x, f32 y, f32 z, f32 width, f32 height, GXColor * color, bool multicolor, bool filled);

void CalculateCutoff(f32 realwidth, f32 realheight, f32 minwidth, f32 maxwidth,
					 f32 minheight, f32 maxheight, f32 scaleX, f32 scaleY,
					 f32 xpos, f32 ypos, int angle,
					 f32 &w1, f32 &h1, f32 &w2, f32 &h2, f32 &w3, f32 &h3, f32 &w4, f32 &h4,
					 f32 &o1, f32 &o2, f32 &o3, f32 &o4, f32 &u1, f32 &u2, f32 &u3, f32 &u4);

#endif
